/**
 * 
 * @param {object} data 
 * @param {string} name 
 * @returns 
 */
export default function lookup(data,name){
    if(name.indexOf('.')!==-1 && name !== '.'){
        const keys = name.split('.')
        let result = data
        for(let key of keys){
            result = result[key]
        }
        return result
    }
    return data[name]
}